﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ModuleEdit.ascx.cs" Inherits="controls_admin_ModuleEdit" %>
<!-- forms -->
<div class="box">
    <!-- box / title -->
    <div class="title">
        <h5 runat="server" id="h5_title">
            Cập nhật Modules
        </h5>
    </div>
    <div id="divMessage" runat="server">
    </div>
    <!-- end box / title -->
    <div class="form">
        <div class="fields">
            <div class="field field-first">
                <div class="label">
                    <label for="input-medium">
                        Tiêu Đề:</label>
                </div>
                <div class="input">
                    <div style="width: 50%; float: left">
                        <asp:TextBox ID="txtTitle" runat="server" CssClass="medium required" Width="385"
                            MaxLength="50" />
                    </div>
                    <div runat="server" id="NOTE_TITLE" class="note" />
                </div>
            </div>
            <div class="field">
                <div class="label">
                    <label for="input-medium">
                        Loại Module</label>
                </div>
                <div class="input">
                    <div style="width: 50%; float: left">
                        <asp:DropDownList ID="ddlType" runat="server" CssClass="select" />
                    </div>
                    <div runat="server" id="NOTE_TYPE" class="note" />
                </div>
            </div>
            <div class="field">
                <div class="label">
                    <label for="input-medium">
                        Danh mục nội dung</label>
                </div>
                <div class="input">
                    <div style="width: 50%; float: left">
                        <asp:DropDownList ID="ddlCategories" runat="server" CssClass="select" />
                    </div>
                    <div runat="server" id="NOTE_MODULE_CONTENT" class="note" />
                </div>
            </div>
            <div class="field">
                <div class="label">
                    <label for="input-medium">
                        Hiển thị tại</label>
                </div>
                <div class="input">
                    <div style="width: 50%; float: left">
                        <asp:ListBox ID="lbxCategories" runat="server" SelectionMode="Multiple" Width="300px"
                            Height="250px" />
                    </div>
                    <div runat="server" id="NOTE_CATEGORY" class="note" />
                </div>
            </div>
            <div class="field">
                <div class="label">
                    <label for="input-medium">
                        Vị trí module</label>
                </div>
                <div class="input">
                    <div style="width: 50%; float: left">
                        <asp:DropDownList ID="ddlLocation" runat="server" CssClass="select">
                            <asp:ListItem Text="Banner" Value="1"></asp:ListItem>
                            <asp:ListItem Text="Giữa" Value="2"></asp:ListItem>
                            <asp:ListItem Text="Bên phải" Value="3"></asp:ListItem>
                        </asp:DropDownList>
                    </div>
                    <div runat="server" id="NOTE_LOCATION" class="note" />
                </div>
            </div>
            <div class="field">
                <div class="label">
                    <label for="input-medium">
                        Số bản ghi trên 1 trang</label>
                </div>
                <div class="input">
                    <div style="width: 50%; float: left">
                        <asp:TextBox ID="txtPageSize" runat="server" CssClass="required number" Text="5" />
                    </div>
                    <div runat="server" id="NOTE_PAGE_SIZE" class="note" />
                </div>
            </div>
            <div class="field">
                <div style="float: left; width: 50%">
                    <div class="label label-radio">
                        <label>
                            Hiển thị trên trang chủ:</label>
                    </div>
                    <div class="input">
                        <div style="float: left; width: 100px">
                            <asp:CheckBox runat="server" ID="cboDisplay" Checked="false" />
                        </div>
                        <div runat="server" id="NOTE_DISPLAY_HOME" class="note" />
                    </div>
                </div>
            </div>
            <div class="field">
                <div style="float: left; width: 50%">
                    <div class="label label-radio">
                        <label>
                            Hiển thị trang chi tiết:</label>
                    </div>
                    <div class="input">
                        <div style="float: left; width: 100px">
                            <asp:CheckBox runat="server" ID="cboDisDetails" Checked="true" />
                        </div>
                        <div runat="server" id="NOTE_DISPLAY_DETAILS" class="note" />
                    </div>
                </div>
            </div>
            <%--<div class="field">
                <div class="label">
                    <label for="input-medium">
                        Thứ tự hiển thị</label>
                </div>
                <div class="input">
                    <div style="width: 50%; float: left">
                        <asp:TextBox ID="txtSDHome" runat="server" CssClass="medium required number" Width="385"
                            Text="1" />
                    </div>
                    <div runat="server" id="stgSortDisplay" class="note" />
                </div>
            </div>--%>
            <div class="buttons">
                <asp:Button ID="btnModuleAction" runat="server" Text="Câp nhật" OnClick="btnModuleAction_Click" />
            </div>
        </div>
    </div>
    <div style="text-align: center; margin: 10px">
        <%if (Session["url"] != null)
          {
              if (Request.UrlReferrer != null)
              {
                  if (!Request.UrlReferrer.ToString().Equals(Request.Url.ToString()))
                  {
                      Session["url"] = Request.UrlReferrer.ToString();                      
                  
        %>
        <a onclick="history.go(-1);" title="Trang trước">
            <%
}
                  else
                  {
            %>
            <a href='<%=Session["url"].ToString() %>' title="Trang trước">
                <%   
}
              }
              else
              {                      
                %>
                <a onclick="history.go(-1);" title="Trang trước">
                    <%}
          }
          else
          {
              if (Request.UrlReferrer != null)
                  Session.Add("url", Request.UrlReferrer.ToString());
              else
                  Session.Add("url", Request.Url.ToString());
                    %>
                    <a href="default.aspx" title="Trang trước">
                        <%} %>
                        <img src="../resources/images/icons/16x16/arrow-return.png" alt="Trang trước" /></a>
                    &nbsp;&nbsp; <a href="default.aspx" title="Trang chủ">
                        <img src="../resources/images/icons/16x16/home.png" alt="Trang chủ" /></a>
    </div>
</div>
<!-- end forms -->
